<?php 
session_start();
$userid=null;
if (isset($_SESSION["userid"])==false || $_SESSION["userid"]==null) {
	header("Location: index.php");
	exit;
} else {
	$userid = $_SESSION["userid"];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>YuHu - My Travel Agent</title>

<script type="text/javascript" src="./js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="./js/jquery-ui-1.7.2.custom.min.js"></script>

<link href="./css/cupertino/jquery-ui-1.7.2.custom2.css" rel="stylesheet" type="text/css" />
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	* {
		font-family: "Trebuchet MS", sans-serif;
		font-size: 11px;
	}
	body { margin: 0em; padding: 0em;}
</style>
<script type="text/javascript">
$(function(){
	
});
</script>	
</head>
<body>
Dear <?php echo $userid; ?>, Welcome to here. <br />
The following is your list.<br />
<table>
<tr><td>Tour name</td><td>Start Date</td><td>End Date</td><td>People</td></tr>
<?php 
require("dbinit.php");

$query = "SELECT * from ucMaintour where colEmail='" . $userid . "'";
$result = mysql_query($query, $link);
while ($row = mysql_fetch_assoc($result)) {
	echo "<tr><td>" . $row["colTourname"] . "</td><td>" . $row["colDatestart"] . "</td><td>" . $row["colDateend"] . "</td><td>" . $row["colPeopleCount"] . "</td></tr>";
}
mysql_close($link);
?>
</table>
</body>
</html>